Repository navigation
docs: correct npx package resolution guidance - #25673
Open
MinhPhuong-hub wants to merge 1 commit into
Open
MinhPhuong-hub wants to merge 1 commit into
MinhPhuong-hub wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Update the
npxpackage resolution guidance indocs/installation.md.The previous explanation incorrectly stated that
npxprioritizes globally installed commands over project-local packages. This does not reflect the behavior documented for modern npm versions.Changes
npxuses the project-local@openapitools/openapi-generator-clipackage when available.Validation
Verified package resolution behavior on Windows using Node.js 24.22.1 and npm/npx 11.19.1.
prettier@2.8.8prettier@3.1.0npx prettier --versionreturned3.1.0.npx --no-install prettier --versionalso returned3.1.0.The observed behavior is consistent with the [official npm documentation](https://docs.npmjs.com/cli/v11/commands/npx/).
This is a documentation-only change. The OpenAPI Generator CLI was not tested directly, and the project build and sample generation were not run.
Summary by cubic
Corrects the
npxpackage resolution guidance indocs/installation.mdto match modern npm behavior.The old instructions claimed
npxprefers globally installed commands over project-local packages. The new guidance states thatnpxuses the local@openapitools/openapi-generator-cliwhen available, may fetch the package into npm's cache otherwise, and shows how to invoke a globally installed CLI directly. This is a documentation-only change; installation and generation commands are unchanged.Written for commit 3748a14. Summary will update on new commits.